﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Work.Domain
{
    /// <summary>
    /// 用户信息
    /// </summary>
    public class User
    {
        /// <summary>
        /// 编号（主键）
        /// </summary>
        [Key]
        public int UserId { get; set; }

        /// <summary>
        /// 用户名（用于登录）
        /// </summary>
        [Required]
        [MaxLength(50)]
        public string Username { get; set; } = string.Empty;

        /// <summary>
        /// 密码（存储加密后的密码）
        /// </summary>
        [Required]
        [MaxLength(255)]
        public string Password { get; set; } = string.Empty;

        /// <summary>
        /// 角色（如：管理员、医生、收费员）
        /// </summary>
        [MaxLength(50)]
        public string? Role { get; set; }

        /// <summary>
        /// 昵称（显示名称）
        /// </summary>
        [MaxLength(100)]
        public string? NickName { get; set; }

    }
}
